home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / MW MPW Binaries 1.1.1a2 / mwcPPC / MWCIncludes / string.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-07-18  |  2.3 KB  |  87 lines  |  [TEXT/MMCC]

  1. /* string.h standard header */
  2. #ifndef _STRING
  3. #define _STRING
  4. #ifndef _YVALS
  5. #include <yvals.h>
  6. #endif
  7.  
  8. #if __MWERKS__
  9. #pragma options align=mac68k
  10. #endif
  11.  
  12.         /* macros */
  13. #ifndef NULL
  14. #define NULL    _NULL
  15. #endif
  16.         /* type definitions */
  17. #ifndef _SIZET
  18. #define _SIZET
  19. typedef _Sizet size_t;
  20. #endif
  21.         /* declarations */
  22. _C_LIB_DECL
  23. int memcmp(const void *, const void *, size_t);
  24. void *memcpy(void *, const void *, size_t);
  25. void *memmove(void *, const void *, size_t);
  26. void *memset(void *, int, size_t);
  27. char *strcat(char *, const char *);
  28. int strcmp(const char *, const char *);
  29. int strcoll(const char *, const char *);
  30. char *strcpy(char *, const char *);
  31. size_t strcspn(const char *, const char *);
  32. char *strerror(int);
  33. size_t strlen(const char *);
  34. char *strncat(char *, const char *, size_t);
  35. int strncmp(const char *, const char *, size_t);
  36. char *strncpy(char *, const char *, size_t);
  37. size_t strspn(const char *, const char *);
  38. char *strtok(char *, const char *);
  39. size_t strxfrm(char *, const char *, size_t);
  40. char *_Strerror(int, char *);
  41. _END_C_LIB_DECL
  42. #ifdef __cplusplus
  43.         /* inlines and overloads, for C++ */
  44. #define _Const_return const
  45. _C_LIB_DECL
  46. const void *memchr(const void *s, int c, size_t n);
  47. const char *strchr(const char *, int);
  48. const char *strpbrk(const char *, const char *);
  49. const char *strrchr(const char *, int);
  50. const char *strstr(const char *, const char *);
  51. _END_C_LIB_DECL
  52. inline void *memchr(void *s, int c, size_t n)
  53.     {return (void *)memchr((const void *)s, c, n);}
  54. inline char *strchr(char *s, int c)
  55.     {return (char *)strchr((const char *)s, c);}
  56. inline char *strpbrk(char *s, const char *p)
  57.     {return (char *)strpbrk((const char *)s, p);}
  58. inline char *strrchr(char *s, int c)
  59.     {return (char *)strrchr((const char *)s, c);}
  60. inline char *strstr(char *s, const char *p)
  61.     {return (char *)strstr((const char *)s, p);}
  62. inline char *strerror(int _Err)
  63.     {return _Strerror(_Err, 0); }
  64. #else
  65. #define _Const_return
  66. void *memchr(const void *, int, size_t);
  67. char *strchr(const char *, int);
  68. char *strpbrk(const char *, const char *);
  69. char *strrchr(const char *, int);
  70. char *strstr(const char *, const char *);
  71.         /* macro overrides, for C */
  72. #define strerror(err)    _Strerror(err, 0)
  73. #endif
  74.  
  75. #if __MWERKS__
  76. #pragma options align=reset
  77. #endif
  78.  
  79. #endif
  80.  
  81.  
  82. /*
  83.  * Copyright (c) 1994 by P.J. Plauger.  ALL RIGHTS RESERVED. 
  84.  * Consult your license regarding permissions and restrictions.
  85.  */
  86.  
  87.